﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Data;
using System.Windows.Media;

namespace JasRibbonApplicatie.Converters
{
    class StatusToImageConverter : IValueConverter
    {

        #region IValueConverter Members

        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            string src = "";
            if (value is Status)
            {
                switch (((Status)value).status)
                {
                    case "afgekeurd":
                        src = "/JasRibbonApplicatie;component/Images/statussen/status_01.png";
                        break;
                    case "nieuw":
                        src = "/JasRibbonApplicatie;component/Images/statussen/status_02.png";
                        break;
                    case "eerste goedkeuring":
                        src = "/JasRibbonApplicatie;component/Images/statussen/status_03.png";
                        break;
                    case "definietieve goedkeuring":
                        src = "/JasRibbonApplicatie;component/Images/statussen/status_04.png";
                        break;
                    case "materiaal buiten":
                        src = "/JasRibbonApplicatie;component/Images/statussen/status_05.png";
                        break;
                    case "ontlening afgerond":
                        src = "/JasRibbonApplicatie;component/Images/statussen/status_06.png";
                        break;
                    default:
                        src = "/JasRibbonApplicatie;component/Images/statussen/status_07.png";
                        break;
                }
            }
            return src;
        }

        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            throw new NotImplementedException();
        }

        #endregion
    }
}
